import cv2 as cv
import sys
import numpy as np

import Config

# img = cv.imread(cv.samples.findFile(Config.img_path))
img = cv.imdecode(np.fromfile(Config.img_path, dtype=np.uint8), -1)
if img is None:
    sys.exit("Could not read the image.")
cv.imshow("Display window", img)
k = cv.waitKey(0)
if k == ord("s"):
    cv.imwrite("starry_night.png", img)
